import { defineStore} from 'pinia'
import {ref} from 'vue'

export default defineStore('user', () => {
	const userInfo = ref({})
	const isLogin = ref(false)
	function uploadUserInfo(val) {
		  userInfo.value = val
	}
	function logout(){
		isLogin.value = false; 
		userInfo.value = {}
		
		console.log('退出')
		
	}
	return {
		userInfo,
		isLogin,
		uploadUserInfo,
		logout
	}
})